package unit9_8;
/*
*   声明异常
* */
public class Test2 {
    public static void function(int i)throws Exception{
        int y=100/i;
        System.out.println("100➗"+i+"="+y);
    }
    public static void main(String[] args) {
        int[] array1={12,99,5,6,2,4,6,8,101};
        for(int x:array1){
            try {
                function(x);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
